<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_id')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-goods_id" data-rule="required" data-source="goods/goods/index" data-field="title" class="form-control selectpage" name="row[goods_id]" type="text" value="">-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group row">
        <label class="control-label col-xs-12 col-sm-2">{:__('预警商品')}:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-template="eventtpl" data-name="row[event]">
                <dd>
                    <ins>{:__('商品名称')}</ins>
                    <ins>{:__('规格')}</ins>
                    <ins>{:__('下限阀值')}</ins>
                    <ins>{:__('上限阀值')}</ins>
                    <ins>{:__('滞留天数')}</ins>
                </dd>
                <dd style="display: none"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                <textarea name="row[event]" class="form-control" cols="30" rows="5" style="display: none">[{$json}]</textarea>
            </dl>
            <script id="eventtpl" type="text/html">
                {volist name="glist" id="vo"}
                    <dd class="form-inline">
                        <ins style="display: none"><input type="text" name="<%=name%>[{$key}][goods_id]" class="form-control "  value="{$vo.id}"  size="10" /></ins>
                        <ins><input type="text" name="<%=name%>[{$key}][id]" class="form-control "  value="{$vo.title}"  size="10" disabled/></ins>
                        <ins><input type="text" name="<%=name%>[{$key}][name]" class="form-control" value="{$vo.specs}" placeholder="名称" disabled/></ins>
                        <ins><input type="number" name="<%=name%>[{$key}][stock_num]" class="form-control " value="" /></ins>
                        <ins><input type="number" name="<%=name%>[{$key}][upper_num]" class="form-control " value="" /></ins>
                        <ins><input type="number" name="<%=name%>[{$key}][keep_num]" class="form-control " value="" /></ins>
                        <!--下面的两个按钮务必保留-->
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                    </dd>
                {/volist}
            </script>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Storehouse_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-storehouse_id" data-rule="required" data-source="data/storehouse/index" class="form-control selectpage" name="row[storehouse_id]" type="text" value="">
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Stock_num')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-stock_num" data-rule="required" class="form-control" name="row[stock_num]" type="number">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Is_monitor')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-is_monitor" data-rule="required" class="form-control" name="row[is_monitor]" type="number" value="0">-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
